package com.huashi.dealer.commonEntity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品规格模型类
 * 对应PHP的GoodsSku.php
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("yoshop_goods_sku")
@Schema(description = "商品规格实体")
public class GoodsSku extends BaseModel {

    /**
     * 商品规格ID
     */
    @TableId(value = "goods_sku_id", type = IdType.AUTO)
    @Schema(description = "商品规格ID")
    private Long goodsSkuId;

    /**
     * 商品ID
     */
    @TableField("goods_id")
    @Schema(description = "商品ID")
    private Long goodsId;

    /**
     * 商品sku记录索引 (由规格id组成)
     */
    @TableField("spec_sku_id")
    @Schema(description = "商品sku记录索引")
    private String specSkuId;

    /**
     * 商品规格
     */
    @TableField("spec")
    @Schema(description = "商品规格")
    private String spec;

    /**
     * 规格图片ID
     */
    @TableField("image_id")
    @Schema(description = "规格图片ID")
    private Long imageId;

    /**
     * 商品编码
     */
    @TableField("goods_no")
    @Schema(description = "商品编码")
    private String goodsNo;

    /**
     * 商品价格
     */
    @TableField("goods_price")
    @Schema(description = "商品价格")
    private BigDecimal goodsPrice;

    /**
     * 商品单价
     */
    @TableField("goods_money")
    @Schema(description = "商品单价")
    private BigDecimal goodsMoney;

    /**
     * 商品划线价
     */
    @TableField("line_price")
    @Schema(description = "商品划线价")
    private BigDecimal linePrice;

    /**
     * 当前库存数量
     */
    @TableField("stock_num")
    @Schema(description = "当前库存数量")
    private Integer stockNum;

    /**
     * 商品销量
     */
    @TableField("goods_sales")
    @Schema(description = "商品销量")
    private Integer goodsSales;

    /**
     * 商品重量(Kg)
     */
    @TableField("goods_weight")
    @Schema(description = "商品重量(Kg)")
    private Double goodsWeight;

    /**
     * 小程序ID
     */
    @TableField("wxapp_id")
    @Schema(description = "小程序ID")
    private Long wxappId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @Schema(description = "创建时间")
    private Long createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @Schema(description = "更新时间")
    private Long updateTime;
} 